/*
 * This file is part of ksPlatform
 * 
 * Copyright (c) 2014-2015
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at 97041437@qq.com.
 */
package cn.com.ksplatform.modules.system.auth.sessionmanager.model;

/**
 * ClassName:OnlineModel.java <br/>
 * Date: 2015年12月4日 <br/>
 * 
 * @author Mr.Xiao
 * @version 1.0
 */
public class OnlineModel {
	//会话ID
	private String sessionId;
	//会话名称
	private String loginName;
	//登录Ip
	private String ip;
	//登录时间
	private long loginTime;
	
	private String ctype;//终端类型
	
	
	public String getSessionId() {
		return sessionId;
	}
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public long getLoginTime() {
		return loginTime;
	}
	public void setLoginTime(long loginTime) {
		this.loginTime = loginTime;
	}
	public OnlineModel(String sessionId, String loginName, String ip,
			long loginTime) {
		this.sessionId = sessionId;
		this.loginName = loginName;
		this.ip = ip;
		this.loginTime = loginTime;
	}
	public OnlineModel() {
	}
	public String getCtype() {
		return ctype;
	}
	public void setCtype(String ctype) {
		this.ctype = ctype;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj.getClass().equals(this.getClass())){
			OnlineModel cobj = (OnlineModel) obj;
			if(this.getSessionId().equals(cobj.getSessionId())){
				return true;
			}
				return false;
		}
		return false;
	}
	
}
